<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="../../../js/bootstrap-3.3.7-dist/css/bootstrap.min.css" />
		<link rel="stylesheet" type="text/css" href="../../../css/footer.css" />
		<link rel="stylesheet" type="text/css" href="../../../css/swiper-3.4.2.min.css" />
		<link rel="stylesheet" type="text/css" href="../css/record_feedback.css" />
		<script src="../../../js/jquery-2.2.3.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../js/layer-v3.1.0/layer/layer.js"></script>
		<link href="../../../js/layer-v3.1.0/layer/theme/default/layer.css" />
		<!--画图插件-->
		<script src="../../../js/flexible.min.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			.foot:nth-child(1) {
				color: #e83023;
			}
		</style>
	</head>

	<body>
		<div id="wrap">
			<div id="main">
				<div id="header">
					<a id="headImg" href="javascript:history.go(-1)"><img class="headImg" src="../../../images/12.png" /></a>
					<p id="headTitle" style="font-size: 16px;">日志反馈</p>
				</div>
				<div id="content" style="padding-top: 1.2rem;background-color: #FFFFFF;">
					<div class="content_p1">
						<p><b>提交人: </b><span id="subName">国鑫</span></p>
					</div>
					<div class="content_p1">
						<p><b>提交时间: </b><span id="subDate">2017年11月6日 星期一</span></p>
					</div>
					<div class="content_p1">
						<p><b>今日总结: </b></p>
						<p id="subToday">
							今天主要完成了三个工作</br>
							1、完成了市场推广的策划案</br>
							2、完成了前期市场推广的准备工作，包括对资源对接整理。</br>
							3、产品背书准备完毕。</br>
						</p>
					</div>
					<div class="content_p1">
						<p><b>明日计划 </b></p>
						<p id="subTomorrow">
							明天主要完成两个工作</br>
							1、确定市场策划案的可执行性，及时优化，形成可执行的策划确定方案</br>
							2、继续对现有资源进行梳理，在市场推广前做好准备工作</br>
						</p>
					</div>
					<div class="content_p1">
						<p><b>评语(非必填) </b></p>
						<textarea id="checkRemark"></textarea>
					</div>
					<div class="content_p2">
						<p><b>积分类型申请: </b>
							<select id="integralSort" name="">
								<option value="积分类型">积分类型</option>
								<option value="日报">日报</option>
								<option value="工作任务">工作任务</option>
								<option value="日常维护">日常维护</option>
								<option value="工作表现">工作表现</option>
								<option value="成长表现">成长表现</option>
							</select>
						</p>
						<p><b>积分申请标准:</b>
							<select id="integralNorm" name="">
								<option value="0">申请标准</option>
								<option value="项目开发">项目开发</option>
								<option value="申请标准">市场推广</option>
								<option value="申请标准">渠道拓展</option>
								<option value="申请标准">培训课程</option>
								<option value="申请标准">网络推广</option>
								<option value="申请标准">文案策划</option>
								<option value="申请标准">财务核算</option>
							</select>
						</p>
						<p><b>积分数: </b>
							<input type="text" id="integralCount" value="0" />
						</p>
					</div>
					<button id="record_sub">提交日志</button>
					<div style="height: 1rem;"></div>
				</div>
			</div>
			<div id="foot" class="row">
				<a class="foot col-xs-3 col-sm-3" href="../../kaoqin/index2.html">
					<img class="footImg" src="../../../images/guanlixuanzhong.png" />
					<p>管理</p>
				</a>
				<a class="foot col-xs-3 col-sm-3" href="../../coalition/colalition.html">
					<img class="footImg" src="../../../images/lianmengchushi.png" />
					<p>联盟</p>
				</a>
				<a class="foot col-xs-3 col-sm-3" href="../../store/store.html">
					<img class="footImg" src="../../../images/11.png" />
					<p>商城</p>
				</a>
				<a class="foot col-xs-3 col-sm-3" href="../../personage/personIndex.html">
					<img class="footImg" src="../../../images/13.png" />
					<p>我的</p>
				</a>
			</div>
		</div>
	</body>
	<script src="../../../js/bootstrap-3.3.7-dist/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../js/handlebars-v2.0.0.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		$(function() {
			joblogSearch();
		});
		//获取该id日志详情
		function joblogSearch() {
			$.ajax({
				cache: false,
				type: "GET",
				url: "http://10.0.47.157:5555/companyapplyfor-service/joblog/search?pageNum=1&pageSize=10&id=" + getQueryString("id"),
				dataType: "JSON",
				async: false,
				error: function(XMLHttpRequest, textStatus, errorThrown) {
					alert("网络异常请稍后重试！");
				},
				success: function(data) {
					var joblog = data.joblog;
					$("#subName").html(joblog.subName); //提交人姓名
					$("#subDate").html(joblog.subDate); //日期
					$("#subToday").html(joblog.subToday); //今日完成
					$("#subTomorrow").html(joblog.subTomorrow); //明日计划
					$("#checkRemark").html(joblog.checkRemark); //评语
					/*	$("#integralSort").html(joblog.integralSort); //积分申请类型
						$("#integralNorm").html(joblog.integralNorm); //积分申请标准
						$("#integralCount").html(joblog.integralCount); //积分数
						$("#checkAccount").html(joblog.checkAccount); //评语人*/
				}
			});
		}
		//获取url后缀参数
		function getQueryString(name) {
			var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
			var r = window.location.search.substr(1).match(reg);
			if(r != null) return decodeURI(r[2]);
			return null;
		}

		$('#record_sub').on('click', function() {
			var checkRemark = $("#checkRemark").val(); //评语
			var integralSort = $("#integralSort").val(); //积分申请类型
			var integralNorm = $("#integralNorm").val(); //积分申请标准
			var integralCount = $("#integralCount").val(); //积分数
			$.ajax({
				cache: false,
				type: "PATCH",
				url: "http://10.0.47.157:5555/companyapplyfor-service/joblog/check?id=" + getQueryString("id") + '&integralSort=' + integralSort + '&integralNorm=' + integralNorm + '&integralCount=' + integralCount + '&checkStatus=1&checkRemark=' + checkRemark,
				dataType: "JSON",
				async: true, //同步
				error: function(XMLHttpRequest, textStatus, errorThrown) {
					alert("网络异常请稍后重试！");
				},
				success: function(data) {
					if(data.code == 1) {
						layer.msg(data.message)
					}
					setTimeout(function() {
						history.go(-1);
					}, 500)
				}
			});
		})

		/*//日报
		var str1 = '<option value="10">工作日志</option>' +
			'<option value="10">工作总结</option>';
		//工作任务
		var str2 = '<option value="10">项目开发</option>' +
			'<option value="10">原型设计</option>' +
			'<option value="10">市场推广</option>' +
			'<option value="10">渠道拓展</option>' +
			'<option value="10">网络推广</option>' +
			'<option value="10">培训课程</option>' +
			'<option value="10">文案策划</option>' +
			'<option value="10">平面设计</option>' +
			'<option value="10">财务核算</option>';
		//日常维护
		var str3 = '<option value="5">打扫办公室</option>' +
			'<option value="5">绿植养护</option>';
		//工作表现
		var str4 = '<option value="5">工作积极</option>' +
			'<option value="5">超额完成任务</option>' +
			'<option value="-5">延迟完成任务</option>' +
			'<option value="-10">没有完成任务</option>' +
			'<option value="-5">工作消极</option>' +
			'<option value="5">加班</option>';
		//成长表现
		var str5 = '<option value="5">考核优异</option>' +
			'<option value="-5">考核低劣</option>';

		$('#leixing').on('change', function() {
			if($('#leixing').val() == '日报') {
				$('#biaozhun').html(str1)
			}
			if($('#leixing').val() == '工作任务') {
				$('#biaozhun').html(str2)
			}
			if($('#leixing').val() == '日常维护') {
				$('#biaozhun').html(str3)
			}
			if($('#leixing').val() == '工作表现') {
				$('#biaozhun').html(str4)
			}
			if($('#leixing').val() == '成长表现') {
				$('#biaozhun').html(str5)
			}
			if($('#leixing').val() == '积分类型') {
				$('#biaozhun').html('<option value="0">申请标准</option>');
			}
			$('#jifenshu').val($('#biaozhun').val())
		})
		$('#biaozhun').on('change', function() {
			$('#jifenshu').val($('#biaozhun').val())
		})*/
	</script>

</html>